/**
 * Copyright (c) 2024,  科泰集团教研团队
 * 版权所有，请勿侵权
 */
package com.ktjiaoyu.service.impl;

import com.ktjiaoyu.entity.SysUser;
import com.ktjiaoyu.mapper.SysUserMapper;
import com.ktjiaoyu.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.sql.SQLException;
import java.util.List;

/**
 * @author 科泰集团教研团队
 * @version 1.0.0
 * @packageName com.ktjiaoyu.service.impl
 * @fileName SysUserServiceImpl.java
 * @createTime 2024/10/1 22:06
 * @lastModify 2024/10/1 22:06
 */
@Service("sysUserService")
public class SysUserServiceImpl implements SysUserService {
    // @Resource
    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public SysUser login(String account, String password) {
        SysUser sysUser = sysUserMapper.getByAccount(account);
        //匹配密码
        if (null != sysUser) {
            if (sysUser.getPassword().equals(password))
                return sysUser;
        }
        return null;
    }
}
